<?php
namespace Home\Controller;
use Think\Controller;
class CommonController extends Controller {
    public function __construct()
    {
        parent::__construct();
        if(empty($_SESSION['user'])&&empty($_COOKIE['user'])){
//            echo "<script>alert('请先登录');location.href='Login/index'</script>";
            $this->redirect('User/index');
        }
    }
}